<%-- 
    Document   : index
    Created on : 5-jun-2014, 13:19:04
    Author     : Anneleen
--%>

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Home Page</title>
    </head>
    <body>
        <div>
            <small>Input comming from the url.</small>
            <br>
            <h1>Hello ${user}</h1>
        </div>
        <br><br>
        <small>Refresh page to show the working of the statefull bean</small>
        <br>
        <% if(request.getAttribute("message") == null) { %>
        <h3>Times you visited this page : ${counter} </h3>
        <% } %>
        <br><br>
        <div>
            <small>Type in number of messages to send to the message driven bean and look for output at System.out</small>
            <br>
            Number of messages to send to the queue: 
            <form action="MessageServlet" method="post">
                <input type="text" name="numberOfMessages" id="numberOfMessages"/>
                <input type="hidden" name="user" value = <%= request.getAttribute("user") %>/>
                <input type="submit" value="Send!">
            </form>
        </div>
        <br><br>
        <div>
            <% if(request.getAttribute("message") != null) { %>
            <h3> <%= request.getAttribute("message") %> </h3>
           <% } %>
        </div>
        <br><br>
        <small>Click this link to add a new item to the db showing JPA beans</small><br><br>
        <a href="addItem.jsp">Create new bakery item</a>
        <br><br>
        <small>To see timer events, look at System out (every 30sec)</small>
        <br><br>
        <small>Press this link to see number of users online implemented with singleton bean</small><br><br>
        <a href="SessionServlet">See number of users online</a><br><br>
         <small>Press this link to test the stateless bean</small><br><br>
        <a href="testStateless.jsp">Go to test stateless bean</a>
    </body>
</html>

